package com.launcher.wkang.receive;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

import com.launcher.wkang.util.Rebooter;

public class ActionBroadCast  extends BroadcastReceiver {
    @Override     public void onReceive(Context context, Intent intent) {
//        Intent intent1 = new Intent("android.intent.action.ACTION_REQUEST_SHUTDOWN");
//        intent1.putExtra("android.intent.extra.KEY_CONFIRM", false);
//        intent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//        context.startActivity(intent1);
//        Toast.makeText(context,"fffffffff",Toast.LENGTH_LONG).show();

        Intent intent1 = new Intent();
        intent.setAction("android.intent.action.ACTION_SHUTDOWN");
//        context.sendBroadCast(intent);
        new Rebooter().reboot("shutdown");
        Log.d("ActionBroadCast","ActionBroadCast");
    }
}
